package com.ss.controller;

import com.ss.entity.User;
import com.ss.response.ResponseResult;
import com.ss.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserLoginController {

    @Autowired
    private UserLoginService userLoginService;

    @PostMapping("/user/login")
    public ResponseResult login(@RequestBody User user){
        return userLoginService.login(user);
    }

    @GetMapping("/user/logout")
    public ResponseResult logout(){
        return userLoginService.logout();
    }

}
